home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-16 | 3.6 KB | 134 lines | [TEXT/MPS ] |
- //
- //
- // File: SLResFil.idl
- // Release Version: $ ODF 1 $
- //
- // Copyright: (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
- //
- //
-
- #ifndef SLRESFIL_IDL
- #define SLRESFIL_IDL
-
- #ifndef SLRESFIL_IDL
- #include "SLStdDef.idl"
- #endif
-
- #ifndef SLREFCNT_IDL
- #include "SLRefCnt.idl"
- #endif
-
- #ifndef SLRESOUR_IDL
- #include "SLResour.idl"
- #endif
-
-
- // interface shutUpAboutTheCommentAlready;
-
-
- //==============================================================================
- // Classes defined in this interface
- //==============================================================================
-
- interface FW_OResourceFile;
-
-
- //==============================================================================
- // Types used by this interface
- //==============================================================================
-
- interface FW_OFileSpecification;
-
-
- //========================================================================================
- // CLASS FW_OResourceFile
- // This class is the reference counted representation class used by the
- // FW_PResourceFile class.
- //========================================================================================
-
- interface FW_OResourceFile : FW_ORefCount
- {
- void InitFromFileSpec(in FW_OFileSpecification newFileSpec);
- // Open a resources file by name.
- // This instance assumes responsibility for closing the file.
-
- void InitFromResFileID(in FW_ResourceFileID resFileID);
- // Attach to a previously opened file.
- // This instance does not assume responsibility for closing the file.
-
- FW_OFileSpecification GetFileSpecification();
- // Get the file specification for the resourcesFile.
-
- FW_Boolean HasResource(in FW_ResourceId resourceId,
- in FW_ResourceType resourceType);
- // Returns TRUE if the resource exists in the file, FALSE if it doesn't.
-
- FW_ResourceHandle GetResourceHandle(in FW_ResourceId resourceId,
- in FW_ResourceType resourceType);
- // Gets the resource handle. Resource data may still be purgeable or unloaded.
- // Client assumes responsibility to call ReleaseResourceHandle when done.
-
- void ReleaseResourceHandle(in FW_ResourceHandle handle);
- // Releases the resource handle. All memory is released.
-
- FW_Boolean PrivHasSpecialResource(in FW_ResourceId resourceId,
- in FW_ResourceType resourceType);
- // Returns TRUE if the resource exists in the file, FALSE if it doesn't.
-
- FW_PlatformHandle PrivGetSpecialResource(in FW_ResourceId resourceId,
- in FW_ResourceType resourceType);
- // Gets the special resource handle.
- // It is the clients reponsibility to release the handle if necessary,
- // using whatever platform specific code is required.
-
- FW_ResourceFileID PrivGetResourceFileID();
- // Return the platforms's "file ID" for this resources file.
-
- #ifdef __SOMIDL__
- implementation
- {
- functionprefix = FW_OResourceFile__;
-
- override:
- somInit,
- somUninit;
-
- releaseorder:
- somInit,
- somUninit,
-
- InitFromFileSpec,
- InitFromResFileID,
- GetFileSpecification,
- HasResource,
- GetResourceHandle,
- ReleaseResourceHandle,
- PrivHasSpecialResource,
- PrivGetSpecialResource,
- PrivGetResourceFileID;
-
- majorversion = 1;
- minorversion = 0;
-
- passthru C_xh =
- "#include \"SLResour.xh\"";
-
- passthru C_xih =
- "";
-
- #ifdef __PRIVATE__
- FW_Boolean fMustCloseFile;
- // TRUE if this instance has assumed responsibility for closing the file.
-
- FW_ResourceFileID fResourceFileID;
- // The platform's file ID for the resources file.
-
- FW_OFileSpecification fFileSpec;
- // The file specification for the resources file.
- #endif
- };
- #endif //# __SOMIDL__
- };
-
- #endif
-